﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace Wpf_Tool_ZC
{
    /// <summary>
    /// Interaction logic for WndZa.xaml
    /// </summary>
    public partial class WndZa : Window
    {
        public WndZa()
        {
            InitializeComponent();
        }

        private void Click_InstalledFontCollection(object sender, RoutedEventArgs e)
        {
            System.Drawing.Text.InstalledFontCollection fonts = new System.Drawing.Text.InstalledFontCollection();
            int idx = 0;
            foreach (System.Drawing.FontFamily family in fonts.Families)
            {
                Console.WriteLine("[{0}]: {1}", idx, family.Name);
                idx++;
            }
            Console.WriteLine("系统所有字体，数量:" +idx);
        }
    }
}
